package com.web.itemService.utils;
import org.springframework.stereotype.Component;
import java.util.Random;

@Component
public class getCode {
    public int getCode() {
        Random random = new Random();
        // 生成一个 6 位的数字验证码
        int captcha = 100000 + random.nextInt(900000);  // 生成范围在100000到999999之间
        return captcha;
    }
}
